const express = require("express");
const app = express();
const path = requier("path");
const bodyParser = require("body-parser");

app.use(bodyParser.json());

app.get("/", (req, res) => {
  res.sendFile(path.join(__dirname, "./views/index.html"));
})

app.post("/postdata", (req, res) => {
  try {
    res.json({
      name: "张三",
      status: 1
    })
  } catch (err) {

  }
})